package protobuf {
	import com.netease.protobuf.*;
	use namespace com.netease.protobuf.used_by_generated_code;
	import com.netease.protobuf.fieldDescriptors.*;
	import flash.utils.Endian;
	import flash.utils.IDataInput;
	import flash.utils.IDataOutput;
	import flash.utils.IExternalizable;
	import flash.errors.IOError;
	import flash.utils.ByteArray;
	// @@protoc_insertion_point(imports)

	// @@protoc_insertion_point(class_metadata)
	public dynamic final class REFOUND_PLAYERINFO extends com.netease.protobuf.Message {
		/**
		 *  @private
		 */
		public static const USERNAME:FieldDescriptor$TYPE_BYTES = new FieldDescriptor$TYPE_BYTES("protobuf.REFOUND_PLAYERINFO.username", "username", (1 << 3) | com.netease.protobuf.WireType.LENGTH_DELIMITED);

		public var username:flash.utils.ByteArray;

		/**
		 *  @private
		 */
		public static const MONEY:FieldDescriptor$TYPE_DOUBLE = new FieldDescriptor$TYPE_DOUBLE("protobuf.REFOUND_PLAYERINFO.money", "money", (2 << 3) | com.netease.protobuf.WireType.FIXED_64_BIT);

		public var money:Number;

		/**
		 *  @private
		 */
		public static const CURRENCY:FieldDescriptor$TYPE_BYTES = new FieldDescriptor$TYPE_BYTES("protobuf.REFOUND_PLAYERINFO.currency", "currency", (3 << 3) | com.netease.protobuf.WireType.LENGTH_DELIMITED);

		public var currency:flash.utils.ByteArray;

		/**
		 *  @private
		 */
		public static const RESULT:FieldDescriptor$TYPE_BOOL = new FieldDescriptor$TYPE_BOOL("protobuf.REFOUND_PLAYERINFO.result", "result", (4 << 3) | com.netease.protobuf.WireType.VARINT);

		private var result$field:Boolean;

		private var hasField$0:uint = 0;

		public function clearResult():void {
			hasField$0 &= 0xfffffffe;
			result$field = new Boolean();
		}

		public function get hasResult():Boolean {
			return (hasField$0 & 0x1) != 0;
		}

		public function set result(value:Boolean):void {
			hasField$0 |= 0x1;
			result$field = value;
		}

		public function get result():Boolean {
			return result$field;
		}

		/**
		 *  @private
		 */
		override used_by_generated_code final function writeToBuffer(output:com.netease.protobuf.WritingBuffer):void {
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.LENGTH_DELIMITED, 1);
			com.netease.protobuf.WriteUtils.write$TYPE_BYTES(output, this.username);
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.FIXED_64_BIT, 2);
			com.netease.protobuf.WriteUtils.write$TYPE_DOUBLE(output, this.money);
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.LENGTH_DELIMITED, 3);
			com.netease.protobuf.WriteUtils.write$TYPE_BYTES(output, this.currency);
			if (hasResult) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 4);
				com.netease.protobuf.WriteUtils.write$TYPE_BOOL(output, result$field);
			}
			for (var fieldKey:* in this) {
				super.writeUnknown(output, fieldKey);
			}
		}

		/**
		 *  @private
		 */
		override used_by_generated_code final function readFromSlice(input:flash.utils.IDataInput, bytesAfterSlice:uint):void {
			var username$count:uint = 0;
			var money$count:uint = 0;
			var currency$count:uint = 0;
			var result$count:uint = 0;
			while (input.bytesAvailable > bytesAfterSlice) {
				var tag:uint = com.netease.protobuf.ReadUtils.read$TYPE_UINT32(input);
				switch (tag >> 3) {
				case 1:
					if (username$count != 0) {
						throw new flash.errors.IOError('Bad data format: REFOUND_PLAYERINFO.username cannot be set twice.');
					}
					++username$count;
					this.username = com.netease.protobuf.ReadUtils.read$TYPE_BYTES(input);
					break;
				case 2:
					if (money$count != 0) {
						throw new flash.errors.IOError('Bad data format: REFOUND_PLAYERINFO.money cannot be set twice.');
					}
					++money$count;
					this.money = com.netease.protobuf.ReadUtils.read$TYPE_DOUBLE(input);
					break;
				case 3:
					if (currency$count != 0) {
						throw new flash.errors.IOError('Bad data format: REFOUND_PLAYERINFO.currency cannot be set twice.');
					}
					++currency$count;
					this.currency = com.netease.protobuf.ReadUtils.read$TYPE_BYTES(input);
					break;
				case 4:
					if (result$count != 0) {
						throw new flash.errors.IOError('Bad data format: REFOUND_PLAYERINFO.result cannot be set twice.');
					}
					++result$count;
					this.result = com.netease.protobuf.ReadUtils.read$TYPE_BOOL(input);
					break;
				default:
					super.readUnknown(input, tag);
					break;
				}
			}
		}

	}
}
